$(document).ready(function(){
	function loadLog() {
		var oldScrollHeight = $("#groupBox_user").attr("scrollHeight") - 20;
			$.ajax({
				url: "includes/select_grp.php",
				cache: false,
				success: function(html) {
					$("#groupBox_user").html(html);
					var newscrollHeight = $("#groupBox_user").attr("scrollHeight") - 20;
					if(newscrollHeight>oldScrollHeight) {
						$("#groupBox_user").animate({ scrollTop: newscrollHeight}, 'normal');
					}
				}
			});
			
		}
		setInterval(loadLog, 5);
});